package main

import (
	"github.com/dullgiulio/pingo"
	"log"
)

func main() {
	p := pingo.NewPlugin("tcp", "chapter8/8.23_pingo/8.23_pingo")
	//启动插件
	p.Start()
	//使用完插件后停止它
	defer p.Stop()
	var resp string
	//从先前创建的对象调用函数
	if error := p.Call("MyPlugin.SayHello", "Go developer", &resp); error != nil {
		log.Print(error)
	} else {
		log.Print(resp)
	}
}
